3.83 \(\int \frac {1}{3+4 x+x^2} \, dx\)

Optimal. Leaf size=6 \[ -\tanh ^{-1}(x+2) \]

[Out]

-arctanh(2+x)

________________________________________________________________________________________

Rubi [B]  time = 0.00, antiderivative size = 17, normalized size of antiderivative = 2.83, number of steps used = 3, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {616, 31} \[ \frac {1}{2} \log (x+1)-\frac {1}{2} \log (x+3) \]

Antiderivative was successfully verified.

[In]

Int[(3 + 4*x + x^2)^(-1),x]

[Out]

Log[1 + x]/2 - Log[3 + x]/2

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {1}{3+4 x+x^2} \, dx &=\frac {1}{2} \int \frac {1}{1+x} \, dx-\frac {1}{2} \int \frac {1}{3+x} \, dx\\ &=\frac {1}{2} \log (1+x)-\frac {1}{2} \log (3+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.00, size = 17, normalized size = 2.83 \[ \frac {1}{2} \log (x+1)-\frac {1}{2} \log (x+3) \]

Antiderivative was successfully verified.

[In]

Integrate[(3 + 4*x + x^2)^(-1),x]

[Out]

Log[1 + x]/2 - Log[3 + x]/2

________________________________________________________________________________________

fricas [B]  time = 1.06, size = 13, normalized size = 2.17 \[ -\frac {1}{2} \, \log \left (x + 3\right ) + \frac {1}{2} \, \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+4*x+3),x, algorithm="fricas")

[Out]

-1/2*log(x + 3) + 1/2*log(x + 1)

________________________________________________________________________________________

giac [B]  time = 0.33, size = 15, normalized size = 2.50 \[ -\frac {1}{2} \, \log \left ({\left | x + 3 \right |}\right ) + \frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+4*x+3),x, algorithm="giac")

[Out]

-1/2*log(abs(x + 3)) + 1/2*log(abs(x + 1))

________________________________________________________________________________________

maple [B]  time = 0.05, size = 14, normalized size = 2.33 \[ -\frac {\ln \left (x +3\right )}{2}+\frac {\ln \left (x +1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^2+4*x+3),x)

[Out]

1/2*ln(x+1)-1/2*ln(3+x)

________________________________________________________________________________________

maxima [B]  time = 1.29, size = 13, normalized size = 2.17 \[ -\frac {1}{2} \, \log \left (x + 3\right ) + \frac {1}{2} \, \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+4*x+3),x, algorithm="maxima")

[Out]

-1/2*log(x + 3) + 1/2*log(x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 6, normalized size = 1.00 \[ -\mathrm {atanh}\left (x+2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(4*x + x^2 + 3),x)

[Out]

-atanh(x + 2)

________________________________________________________________________________________

sympy [B]  time = 0.10, size = 12, normalized size = 2.00 \[ \frac {\log {\left (x + 1 \right )}}{2} - \frac {\log {\left (x + 3 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**2+4*x+3),x)

[Out]

log(x + 1)/2 - log(x + 3)/2

________________________________________________________________________________________